The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.
Programmatic containers encapsulate computer program applications within individual, relatively isolated runtime environments. For example, a programmatic container may bundle into a single package an application program with its dependencies, libraries, and configuration files. Thus, programmatic containers enable portability across different operating systems and different hardware environments. In other words, programmatic containers provide many of the benefits of virtual machine instances. At the same time, programmatic containers use significantly fewer resources than virtual machine instances. For example, a programmatic container may be several megabytes in size, whereas a virtual machine instance may be several gigabytes in size.
One reason for this difference is that a programmatic container uses the operating system kernel of its host computer, whereas a virtual machine instance includes an entire operating system that runs on top of the operating system kernel of its host computer. This lightweight aspect of programmatic containers makes them popular alternatives to virtual machine instances for developing computer program applications. For example, a computer program application may be deployed at one or more times as a set of programmatic containers. Furthermore, each programmatic container may include a set of code that exhibits simplified dependencies and/or is otherwise streamlined for performance efficiency.
However, programmatic containers may impose constraints on inter-process communications. For example, different programmatic containers may have different namespaces. Thus, different programmatic containers may have different views of processes, networking interfaces, files, and/or any other system resource. As such, an application program in one programmatic container may be unable to receive data from a different application program in another programmatic container. For example, if different programmatic containers fail to share a same network namespace, application programs in the different programmatic containers may be unable to communicate using local network connections.
One approach for avoiding the communication constraints of programmatic containers is to include multiple application programs in a single programmatic container. For example, a monitored program and a monitoring program may share a programmatic container, thereby enabling the monitoring program to receive data from the monitored program. However, this approach undercuts many advantages of programmatic containers over virtual machine instances. For example, container density may significantly increase due to additional dependencies, libraries, and configuration files required to run additional programs. Running multiple programs in a high-density container may adversely affect performance by utilizing more computing and/or networking resources. Furthermore, if a monitoring program is to monitor multiple application programs in multiple programmatic containers, then each programmatic container may require a copy of the monitoring program. In such a case, it may be more efficient avoid using programmatic containers altogether.
Thus, there is a need for better ways of enabling communication between application programs in different programmatic containers.